<% project ||= report_element.project %>
<div class="report-element report-project-header-element">
  <div class="report-element-body" data-hook="report-project-header-element">
    <h2 class="project-name">
      <%= link_to t('projects.reports.elements.project_header.title', project: project.name), project_url(project), target: :_blank %>
      <% if project.archived? %>
        <span class="label label-warning"><%= t('search.index.archived') %></span>
      <% end %>
    </h2>
    <% unless @settings['exclude_timestamps'] %>
      <div class="user-time">
        <%= t('projects.reports.elements.project_header.user_time', code: project.code, timestamp: l(project.created_at, format: :full)) %>
      </div>
    <% end %>
  </div>
  <% if defined?(children) %>
    <div class="report-element-children">
      <%= children %>
    </div>
  <% end %>
</div>
